<{if $data}>
  <div id="rank_tree">
		<div class="list_title">
			<i class="iconfont">&#xe613;</i><span><{t}>所有类别<{/t}></span>
		</div>
		<{foreach from=$data item=cat key=catId}>
		<div class="list_title">
			<{if $cat.children}>
				<i class="iconfont rank_handle">&#xe61a;</i>
				<i class="iconfont rank_handle" style="display:none;">&#xe61b;</i>
			<{else}>
				<i class="iconfont">&nbsp;&nbsp;&nbsp;&nbsp;</i>
			<{/if}>
			<a href="<{$cat.url}>"><{$cat.cat_name}></a>
		</div>
		<div class="icon_add" <{if !$cat.children}>style="display:none;"<{/if}>>
			<{if $cat.children}>
				<ul>
					<{foreach from=$cat.children item=child key=childId}>
						<li>
							<a href="<{$child.url}>"><{$child.cat_name}></a>
						</li>
					<{/foreach}>
				</ul>
			<{/if}>
		</div>
		<{/foreach}>
	</div>
	<script>
	void function(){
		$$('.rank_handle').addEvent('click', function(e){
			if($(this).hide().getNext('i'))
			{
				$(this).hide().getNext('i').show();
				$(this).getParent('.list_title').getNext('.icon_add').hide();
			}
			else
			{
				$(this).hide().getPrevious().show();
				$(this).getParent('.list_title').getNext('.icon_add').show();
			}
		});
	}();
	</script>
<{else}>
	&nbsp;
<{/if}>

